package com.example.mybatisplusdemo.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.mybatisplusdemo.model.domain.Favorite;
import com.example.mybatisplusdemo.model.domain.Merchant;
import com.example.mybatisplusdemo.model.domain.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.mybatisplusdemo.model.dto.YearUserActivityDTO;
import com.example.mybatisplusdemo.model.dto.YesrCountDTO;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author lxp
 * @since 2025-07-04
 */
public interface IUserService extends IService<User> {

    User loginByUsername(User user);

    User loginByPhone(User user);

    User loginByEmail(User user);

    User loginByWechat(User user);

    boolean registerByPhone(User user);

    boolean registerByEmail(User user);

    boolean registerByWechat(User user);

    boolean userRegister(User user);

    Page<User> listUsers(Page<User> page, User user);

    boolean freezeById(Long id);

    boolean unfreezeById(Long id);

    User getOtherUserInfo(Long id);

    List<YesrCountDTO> getAnnualRegistrations(Integer startYear, Integer endYear);

    List<YearUserActivityDTO> getUserActivityByYear(Integer startYear, Integer endYear);

    Integer getPrivacySettingsById(Long userId);
}
